package main

import (
	"framework/mychiroute/mychi"
	"net/http"
)

func main() {
	r := mychi.NewMux()
	r.Get("/", func(w http.ResponseWriter, r *http.Request) {
		w.Write([]byte("Hello chi!"))
	})

	r.Get("/user/{id}", func(w http.ResponseWriter, r *http.Request) {
		w.Write([]byte("User ID: " + mychi.URLParam(r, "id")))
	})

	http.ListenAndServe(":8080", r)
}
